﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
using DAO;
using DTO;

namespace Banking.Nhân_viên
{
    public partial class ChiTietKH : Form
    {
        KhachHang khDTO;
        public ChiTietKH(int makh)
        {
            InitializeComponent();
            khDTO = KhachHangDA.GetById(makh);
        }

        private void ChiTietKH_Load(object sender, EventArgs e)
        {
            if (khDTO.MaLoaiKH == 1)//ca nhan
            {
                DangKyKhachHangCaNhan uCtrCaNhan = new DangKyKhachHangCaNhan(khDTO);
                pnMain.Controls.Clear();
                pnMain.Controls.Add(uCtrCaNhan);
            }
            else if (khDTO.MaLoaiKH == 2)//doanh nghiep
            {
                DangKyKhachHangDoanhNghiep uCtrCaNhan = new DangKyKhachHangDoanhNghiep(khDTO);
                pnMain.Controls.Clear();
                pnMain.Controls.Add(uCtrCaNhan);
            }
        }

    }
}
